package com.shop.service.impl;


import com.shop.dao.impl.ProductDaoImpl;
import com.shop.entity.Product;
import com.shop.service.GoodsService;

import java.util.List;

public class GoodServiceImpl implements GoodsService {
    private ProductDaoImpl productDAOimpl = new ProductDaoImpl();
    //查询所有
    @Override
    public List<Product> list(int tid) {
        return productDAOimpl.list(tid);
    }
    //个数
    @Override
    public Long count(int tid) {
        return productDAOimpl.count(tid);
    }
    //分页查询
    @Override
    public List<Product> list(int tid, int begin, int finish) {
        return productDAOimpl.list(tid, begin, finish);
    }

    @Override
    public Product listone(int pid) {
        return productDAOimpl.listone(pid);
    }

    @Override
    public List<Product> like(String pname) {
        return productDAOimpl.like(pname);
    }

    @Override
    public List<Product> list(String pname, int begin, int finish) {
        return productDAOimpl.list(pname,begin,finish);
    }

    @Override
    public Long count(String pname) {
        return productDAOimpl.count(pname);
    }

}
